<h2>对 {echo $order['seller_username']} 卖家评价</h2>
    {if $order['seller_is_evaluate']==1}<h3>卖家已评价</h3>{/if}
    <div id="star">
        <ul>
            <li><a href="javascript:;">1</a></li>
            <li><a href="javascript:;">2</a></li>
            <li><a href="javascript:;">3</a></li>
            <li><a href="javascript:;">4</a></li>
            <li><a href="javascript:;">5</a></li>
        </ul>
        <span><strong>0 分</strong> 工作速度</span>
        <p></p>
    </div>

    <div id="star2">
        <ul>
            <li><a href="javascript:;">1</a></li>
            <li><a href="javascript:;">2</a></li>
            <li><a href="javascript:;">3</a></li>
            <li><a href="javascript:;">4</a></li>
            <li><a href="javascript:;">5</a></li>
        </ul>
        <span><strong>0 分</strong> 服务态度</span>
        <p></p>
    </div>
    
    
    <div id="star3">
        <ul>
            <li><a href="javascript:;">1</a></li>
            <li><a href="javascript:;">2</a></li>
            <li><a href="javascript:;">3</a></li>
            <li><a href="javascript:;">4</a></li>
            <li><a href="javascript:;">5</a></li>
        </ul>
        <span><strong>0 分</strong> 完成质量</span>
        <p></p>
    </div>
  
        
        <div class="control-group">
            <div class="radio">
            <img src="{echo AURL}/img/hao.png" />
			<label>
              <input type="radio" value="1" name="evaluate" checked="checked">
                    <span class="text">好评</span>
              </label>
          </div>
            <div class="radio">
            <img src="{echo AURL}/img/zhong.png" />
                <label>
                    <input type="radio" class="inverted" value="2" name="evaluate">
                    <span class="text">中评</span>
                </label>
            </div>
            <div class="radio">
            <img src="{echo AURL}/img/cha.png" />
                <label>
                    <input type="radio" class="inverted" value="3" name="evaluate">
                    <span class="text">差评</span>
                </label>
            </div>
        </div>
        
        
        
        
        <p>评语：(100字内)</p>
        
        <textarea id="EvaluateContent" class="form-control" style="width:100%;height:100px;margin-bottom:10px;"></textarea><p style="text-align:center;margin-top:10px;">
        
     <div class="text-right"><a class="btn btn-darkorange btn-sm" href="javascript:void(0);" onclick="SubmitEvaluate({echo $order['oid']},1);">提交评价</a></div>
     
     <script type="text/javascript"> 
	$(function(){ 
	
		var aMsg1 = [
					"很不满意|速度慢得太离谱，非常不满意",
					"不满意|速度很慢，不满意",
					"一般|速度还行",
					"满意|速度蛮快，不错",
					"非常满意|速度非常快，非常不错"
					]
					
		var aMsg2 = [
			"很不满意|卖家态度很差，还骂人、说脏话，简直不把顾客当回事",
			"不满意|卖家有点不耐烦，承诺的服务也兑现不了",
			"一般|卖家回复问题很慢，态度一般，谈不上沟通顺畅",
			"满意|卖家服务挺好的，沟通挺顺畅的，总体满意，不错",
			"非常满意|卖家的服务太棒了，考虑非常周到，完全超出期望值"
			]
			
		var aMsg3 = [
			"很不满意|差得太离谱，与卖家描述的严重不符，非常不满",
			"不满意|部分有问题，与卖家描述的不符，不满意",
			"一般|质量一般，没有卖家描述的那么好",
			"满意|质量不错，与卖家描述的基本一致，还是挺满意的",
			"非常满意|质量非常好，与卖家描述的完全一致，非常满意"
			]
			
	 showstar('#star',aMsg1);
	 showstar('#star2',aMsg2);
	 showstar('#star3',aMsg3);
	 
	});
	

	function SubmitEvaluate(oid,type){
			
		bootbox.confirm({  
		   buttons: {  
			  confirm: {  
				 label: '确认',  
			  },  
			  cancel: {  
				 label: '取消',  
			  }  
		   },  
		   title:'提示',
		   message: '<i class="glyphicon glyphicon-warning-sign"></i> 您确认要提交评价?',  
			   callback: function(result) {  
				  if(result) {  
					 bootbox.hideAll();
					 
					 var evaluate=$('input[name="evaluate"]:checked').val();
					 var content=$('#EvaluateContent').val();
					 if(type==1){
						 var workspeed=parseInt($('#star span').find('strong').html().replace(/分/gi,''));
						 var worksattitude=parseInt($('#star2 span').find('strong').html().replace(/分/gi,''));
						 var worksquality=parseInt($('#star3 span').find('strong').html().replace(/分/gi,''));
					 }
					 
					 $.post('{echo U("/post/task/evaluate/id/".$id)}',{oid:oid,evaluate:evaluate,content:content,workspeed:workspeed,worksattitude:worksattitude,worksquality:worksquality}, function(json) {
								
							$('.bootbox').PhpappProgress({json:json});
		
							return true;
								
					 }, 'json');
					 
					  bootbox.dialog({
							 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
							 title: '<i class="icon fa fa-retweet"></i> 提交中',
							 closeButton: false
					 }).PhpappProgress({time:5000});
				 
					  return false; 
		  
				  }
			   } 
		
		})
		
		return false;
			
	}
	</script>